package utils;

import android.content.Context;
import android.content.SharedPreferences;

import common.Constant;
import common.MyApplication;

/**
 * Created by Administrator on 2017/3/29.
 */

public class SPUtils {
    private static SharedPreferences sharedPreferences;
    public static SharedPreferences getSharedPreferences(){
        sharedPreferences = MyApplication.getContext().getSharedPreferences(Constant.BASE_SP, Context.MODE_APPEND);
        return sharedPreferences;
    }
    public static void putString(String key,String value){
        SharedPreferences.Editor edit = MyApplication.getContext().getSharedPreferences(Constant.BASE_SP, Context.MODE_APPEND).edit();
        edit.putString(key,value);
        edit.commit();
    }
}
